#! /bin/bash

if [ $# -lt 1 ]
then
    echo "No parameters specified."
    exit 1
fi

max=$1
min=$1
for p in $*
do
    if [ $p -gt $max ]
    then
	max=$p
    fi

    if [ $p -lt $min ]
    then
	min=$p
    fi
done

echo "max=$max"
echo "min=$min"

